<%--
  User: zhangteng
  Date: 2015/1/4 19:48
--%>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<!DOCTYPE html>
<html lang="en">
<head>
    <title>添加会员</title>
    <%@include file="../../common/head.jsp" %>
</head>

<body>
<%@include file="../../common/header.jsp" %>

<div class="main-container" id="main-container">
    <div class="main-container-inner">
        <a class="menu-toggler" id="menu-toggler" href="#">
            <span class="menu-text"></span>
        </a>

        <div class="sidebar" id="sidebar">
            <%@include file="../../common/sidebar.jsp" %>
            <%@include file="../../common/menu.jsp" %>
            <!-- /.nav-list -->
        </div>

        <div class="main-content">
            <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li>
                        <i class="icon-home home-icon"></i>
                        <a href="#">音像商店管理系统</a>
                    </li>
                    <li>会员管理</li>
                    <li class="active">添加会员</li>
                </ul>
                <!-- .breadcrumb -->
            </div>

            <div class="page-content">
                <div class="page-header">
                    <h1>
                        添加会员
                    </h1>
                </div>
                <!-- /.page-header -->

                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <div class="row">
                            <div class="col-xs-12">
                                <form class="form-horizontal" role="form" method="post" action="${website}admin/member">

                                    <div class="form-group">
                                        <label class="col-sm-3 control-label no-padding-right"> 会员名称 </label>

                                        <div class="col-sm-9">
                                            <input type="text" placeholder="会员名称" class="col-xs-10 col-sm-5" name="name"
                                                   value="" />&nbsp; &nbsp; &nbsp;
                                        </div>
                                    </div>

                                    <div class="space-4"></div>

                                    <div class="form-group">
                                        <label class="col-sm-3 control-label no-padding-right"> 会员电话 </label>

                                        <div class="col-sm-9">
                                            <input type="text" placeholder="会员电话" class="col-xs-10 col-sm-5"
                                                   name="phone" value="" />&nbsp; &nbsp; &nbsp;
                                        </div>
                                    </div>

                                    <div class="space-4"></div>

                                    <div class="form-group">
                                        <label class="col-sm-3 control-label no-padding-right"> 会员地址 </label>

                                        <div class="col-sm-9">
                                            <input type="text" placeholder="会员地址" class="col-xs-10 col-sm-5"
                                                   name="address" value="" />&nbsp; &nbsp; &nbsp;
                                        </div>
                                    </div>

                                    <div class="clearfix form-actions">
                                        <div class="col-md-offset-3 col-md-9">
                                            <button class="btn btn-info" type="submit">
                                                <i class="icon-ok bigger-110"></i>
                                                保存
                                            </button>

                                            &nbsp; &nbsp; &nbsp;
                                            <button class="btn" type="reset">
                                                <i class="icon-undo bigger-110"></i>
                                                重置
                                            </button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <!-- /row -->
                        <!-- PAGE CONTENT ENDS -->
                    </div>
                    <!-- /.col -->
                </div>
                <!-- /.row -->
            </div>
            <!-- /.page-content -->
        </div>
        <!-- /.main-content -->
    </div>
    <!-- /.main-container-inner -->

    <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
        <i class="icon-double-angle-up icon-only bigger-110"></i>
    </a>
</div>
<!-- /.main-container -->

<%@include file="../../common/footer.jsp" %>
<script type="text/javascript" src="${staticWebsite}js/jquery.validate.min.js"></script>
<script type="text/javascript">
    $(function ($) {
        $('form').validate({
            errorElement: 'div',
            errorClass: 'help-block',
            focusInvalid: false,
            rules: {
                id: {
                    required: true
                }
            },

            messages: {
                id: {
                    required: "请输入供应商编号"
                }
            },
            invalidHandler: function (event, validator) { //display error alert on form submit
                $('.alert-danger', $('.login-form')).show();
            },
            highlight: function (e) {
                $(e).closest('.form-group').removeClass('has-info').addClass('has-error');
            },
            success: function (e) {
                $(e).closest('.form-group').removeClass('has-error').addClass('has-info');
                $(e).remove();
            },
            errorPlacement: function (error, element) {
                error.insertAfter(element);
            },
            submitHandler: function (form) {
                form.submit();
            },
            invalidHandler: function (form) {
            }
        });
    });
</script>
</body>
</html>
